﻿// 文件使用MiniExcel源码， 使用时需遵循其 Apache License 2.0
// 修改摘要通知： 删除异步、Task等net2.0中不支持的内容，替换原先C#自带的zip处理方式，改用yacomp 进行解压缩。
using ExcelConfig.Utils;
using System.Collections.Generic;

namespace ExcelConfig.WriteAdapter
{
    internal interface IMiniExcelWriteAdapter
    {
        bool TryGetKnownCount(out int count);

        List<ExcelColumnInfo> GetColumns();

        IEnumerable<IEnumerable<CellWriteInfo>> GetRows(List<ExcelColumnInfo> props);
    }

    internal readonly struct CellWriteInfo
    {
        public CellWriteInfo(object value, int cellIndex, ExcelColumnInfo prop)
        {
            Value = value;
            CellIndex = cellIndex;
            Prop = prop;
        }

        public object Value { get; }
        public int CellIndex { get; }
        public ExcelColumnInfo Prop { get; }
    }
}


